PROJECT(TTSService) 
cmake_minimum_required(VERSION 3.16)

SET( CMAKE_VERBOSE_MAKEFILE on )
SET(CMAKE_SYSTEM_NAME Linux)

#异常保存文件
if(${IsCoreDump} STREQUAL "NO_COREDUMP_FILE")
    ADD_DEFINITIONS("-DNO_COREDUMP_FILE")
endif()

#编译类型
if(${BuildType} STREQUAL "Debug")
    set(CMAKE_BUILD_TYPE "Debug")    #
    ADD_DEFINITIONS("-DDebug")
else()
    set(CMAKE_BUILD_TYPE "Release")    #
    #ADD_DEFINITIONS("-DRelease")
endif()

message("CMAKE_BUILD_TYPE=" ${CMAKE_BUILD_TYPE})



#内存检测配置 -DDMALLOC -DDMALLOC_FUNC_CHECK
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -W -Wall -g  -std=c++11 -D__const__= -pipe -Wno-unused-parameter -fPIC -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -W -Wall -s  -std=c++11 -D__const__= -pipe -Wno-unused-parameter -fPIC -fno-omit-frame-pointer")


#头文件路径
INCLUDE_DIRECTORIES(
    "${PROJECT_SOURCE_DIR}/Resource/ali"
    )

#链接库路径
link_directories(
    "${PROJECT_SOURCE_DIR}/Resource/ali"
   ) 

#连接的库
link_libraries(brpc cjson  gflags glog  boost_regex protobuf pthread crypto protoc ttscei uuid )
   

#项目依赖的模块目录
add_subdirectory("Src")
#add_subdirectory("Tools")
